/*
 * Unit test for function numHandCards in dominion.c
 *
 * unittest2: unittest2.c dominion.o rngs.o
 *     gcc -o unittest2 -g  unittest2.c dominion.o rngs.o $(CFLAGS)
 */

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

int main() {
    int seed = 1000;
    int numPlayer = 2;
    int check;
    int k[10] = {adventurer, council_room, feast, gardens, mine
               , remodel, smithy, village, baron, great_hall};
    struct gameState G;

    printf ("TESTING numHandCards():\n");
    memset(&G, 23, sizeof(struct gameState));   // clear the game state
    initializeGame(numPlayer, k, seed, &G); // initialize a new game

    int testValue = 100;
    G.handCount[0] = testValue;
    G.handCount[1] = testValue;
    check = numHandCards(&G);
    //printf("This is what numHandCards function returns: %d\n", check);
    assert(check == testValue);
    printf("All tests passed!\n");

    return 0;
}
